package com.rui.study.demo.httpclient.mpr;

import com.rui.study.demo.httpclient.HttpClient;
import com.rui.study.demo.httpclient.util.JsonUtil;

import java.util.HashMap;
import java.util.Map;

/**
 * @program: study
 * @description:
 * @author: Yaowr
 * @create: 2018-11-22 09:59
 **/
public class GoodsOrder {

    /**
     * 1--区块链：获取订单
     */
    private static void goodsOrderListByXChain() {
        String url = "http://172.16.2.134:9899/v1/chain/orders/list?unification_id=1234&roles=provider&classify=all&category=digital&pageIndex=1&pageSize=10";
//        String url = "http://172.16.3.134:9899/v1/chain/orders?type=all&category=digital&pageIndex=&pageSize=";
        HttpClient.get(url);
    }

    /**
     * 2--订单服务：获取订单列表
     */
    private static void goodsOrderList() {
        String url = "http://localhost:11027/v1/goods-order?pageIndex=1&pageSize=10";
        HttpClient.get(url);
    }

    /**
     * 3--商品服务：获取出版物名称
     */
    private static void queryPublicationName() {
        String url = "http://localhost:11026/v1/publication-name/by-contract-id?contractId=123";
        HttpClient.get(url);
    }

    /**
     * 3--订单服务-开发环境：获取出版物名称
     */
    private static void goodsOrderListForDev() {
        String url = "http://172.16.2.16:11000/gos/goods-orders/v1/goods-order";
        HttpClient.get(url);
    }

    public static void main(String[] args) {
        goodsOrderListByXChain();
//        goodsOrderList();
//        queryPublicationName();
//        goodsOrderListForDev();
    }
}
